package com.wargame.engine;

import com.wargame.hexmap.HexagonalMap;
import com.wargame.engine.Judge;


public Object CalloutAction(Operator thisOpr, Action action, HexagonalMap map, HashMap<String, Judge> judgeHandlers)
{
    String actionName = (String) action.getAttri("Name");
    if (actionName.equals("Shoot"))
    {
        Object[] params = new Object[]{action};
        return thisOpr.invokeMethod("CalloutShootAction", params);
    }
    else if (actionName.equals("Move"))
    {
        Object[] params = new Object[]{action, map};
        return thisOpr.invokeMethod("CalloutMoveAction", params);
    }
    // else if (actionName == "Occupy")
    // {
    //     return thisOpr.InvokeMethod("CalloutOccupyAction", param);
    // }
    // else if (actionName == "ChangeState")
    // {
    //     return thisOpr.InvokeMethod("CalloutChangeStateAction", param);
    // }
    // else if (actionName == "StopMove")
    // {
    //     return thisOpr.InvokeMethod("CalloutStopMoveAction", param);
    // }
    // else if (actionName == "WeaponLock")
    // {
    //     return thisOpr.InvokeMethod("CalloutWeaponLockAction", param);
    // }
    // else if (actionName == "WeaponUnfold")
    // {
    //     return thisOpr.InvokeMethod("CalloutWeaponUnfoldAction", param);
    // }
    else
    {
        System.out.printl("未录入的动作类型：" + actionName);
        return null;
    }
}
